package i18n;

import javafx.scene.input.DataFormat;

import java.text.DateFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;

public class Test {
    public static void main(String[] args) {


        Date date=new Date();

        System.out.println(date);

        DateFormat dateFormat=DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL);

        System.out.println(dateFormat.format(date));

        Locale locale=Locale.getDefault();

        System.out.println(locale.getCountry()+" "+locale.getLanguage());


        double d=12323553245325.23;

        NumberFormat numberFormat=NumberFormat.getNumberInstance();

        System.out.println(numberFormat.format(d));

        numberFormat=NumberFormat.getCurrencyInstance();

        System.out.println(numberFormat.format(d));


//        ResourceBundle rb=ResourceBundle.getBundle("i18n/resource");
        ResourceBundle rb=ResourceBundle.getBundle("i18n.resource");

        String a=rb.getString("a");

        System.out.println(a);



//        Locale[] locales=Locale.getAvailableLocales();
//
//        for (Locale locale1 : locales) {
//            System.out.println(locale1.getCountry()+" "+locale1.getLanguage());
//        }

    }
}
